<meta charset="UTF-8">
<?php
require ('./lib/init.php');
$number = 1 ;
// 判断用户是否登录
if (!acc()) {
    header('Location:login.php');
}
//评论分页
$sql = "select count(*) from comment";
$num = mGetOne($sql);//评论总数
$curr = isset($_GET['page']) ? $_GET['page'] : 1;//当前页码
$cnt = 7 ;//每页显示条数
$page = getPage($num,$curr,$cnt);

$sql = "select * from comment" . ' order by comment_id  desc limit ' . ($curr-1) * $cnt . ',' . $cnt;
$comms = mGetAll($sql);
require (ROOT . '/view/admin/commlist.html');
?>
